package shuzu

import (
	"fmt"
	"math"
	"sort"
)

func RemoveElement(nums []int, val int) int {
	inner := math.MinInt32
	k := 0
	for i := 0; i < len(nums); i++ {
		if nums[i] == val {
			nums[i] = inner
			k++
		}
	}
	sort.Slice(nums, func(i, j int) bool {
		return nums[i] > nums[j]
	})
	fmt.Println(nums)
	return len(nums) - k
}
